package com.yaolong.api.modules.gen.constants;

import java.util.UUID;

/**
 * @author yaolong
 * @version V1.0.0
 * @program EasyCode
 * @description
 * @create 2022-12-29 17:17
 **/
public class GenConstants {


    /**
     * 模板获取的方式-从数据库获取
     */
    public final static String TEMPLATE_DB_TYPE = "DB";
    /**
     * 模板获取的方式-路径读取
     */
    public final static String TEMPLATE_PATH_TYPE= "PATH";
    /**
     * 模板分割符(使用uuid保证拼接的字符串不会和当前你分隔符重复)
     */
    public final static String TEMPLATE_TYPE_SEPARATOR = "::";

    /**
     * 生成类型
     */
    public final static String OUTPUT_TYPE_STRING = "string";
    public final static String OUTPUT_TYPE_FILE = "file";


    /**
     * 代码生成方式 zip方式 , 内部代码方式
     */
    public final static String GEN_MODE_ZIP = "zip";
    public final static String GEN_MODE_INNER = "inner";

    /**
     * 常量-自定义配置
     */
    public final static String CUSTOM_CONFIG_FIELD = "customConfig";
    public final static String CONFIG_FIELD = "config";
    public final static String TEMPLATE_RESULT_FIELD = "outputTemplateResult";
    public final static String FILE_GEN_TYPE_VUE = "VUE";
    public final static String FILE_GEN_TYPE_JAVA = "JAVA";
    public final static String FILE_GEN_TYPE_SQL = "SQL";
    public final static String FILE_GEN_TYPE_OTHER = "OTHER";

    /**
     * 模板生成的后台基本类型（固定的）
     */
    public final static String GEN_TEMPLATE_SERVICE_TYPE = "service";
    public final static String GEN_TEMPLATE_SERVICE_IMPL_TYPE = "serviceImpl";
    public final static String GEN_TEMPLATE_CONTROLLER_TYPE = "controller";
    public final static String GEN_TEMPLATE_ENTITY_TYPE = "entity";
    public final static String GEN_TEMPLATE_MAPPER_TYPE = "mapperXml";
    public final static String GEN_TEMPLATE_DAO_TYPE = "dao";

    /**
     * (vben配套) 模板生成的前端基本类型
     */
    public final static String GEN_TEMPLATE_API_TS_TYPE = "apiTs";
    public final static String GEN_TEMPLATE_API_MODEL_TS_TYPE = "apiModelTs";
    public final static String GEN_TEMPLATE_VIEWS_INDEX_VUE_TYPE = "viewsIndexVue";
    public final static String GEN_TEMPLATE_VIEWS_TREE_VUE_TYPE = "viewsTreeVue";
    public final static String GEN_TEMPLATE_VIEWS_MODAL_VUE_TYPE = "viewsModalVue";
    public final static String GEN_TEMPLATE_VIEWS_DATA_TS_TYPE = "viewsDataTs";
    public final static String GEN_TEMPLATE_VIEWS_DRAWER_VUE_TYPE = "viewsDrawerVue";



    /**
     * 正则
     */
    public final static String DRIVE_REGEX = "^[A-z]:\\\\([^|><?*\":\\/]*\\\\)*([^|><?*\":\\/]*)?$";


    /**
     * 数据库类型
     */
    public final static String DB_TYPE_MYSQL = "mysql";
    public final static String DB_TYPE_ORACLE = "oracle";
    public final static String DB_TYPE_SQLSERVER = "sqlserver";
    public final static String DB_TYPE_POSTGRESQL = "postgresql";
    public final static String DB_TYPE_BD2 = "bd2";

    /**
     * 模板引擎类型
     */
    public final static String TEMPLATE_ENGINE_FREEMARKER = "ftl";
    public final static String TEMPLATE_ENGINE_BEETL = "beetl";
    public final static String TEMPLATE_ENGINE_VELOCITY = "vtl";
}
